<script setup>
import {defineProps} from 'vue';

defineProps({
	banners: {
		type: Array,
		default() {
			return [];
		}
	}
});

</script>

<template>
	<van-swipe v-if="banners.length>0" :autoplay="3000" class="my-swipe" indicator-color="white">
		<van-swipe-item v-for="(item) in banners" :key="item.id">
			<img v-lazy="item['img_url']" alt="">
		</van-swipe-item>
	</van-swipe>
</template>

<style lang="scss" scoped>
img {
	width: 100%;
	height: auto;
}
</style>